package ift605.tp3.utils.potentialyuseless;

import ift605.tp3.utils.equations.EquationUtility;
import ift605.tp3.utils.equations.IEquation;
import ift605.tp3.utils.equations.UnknownEquationTypeException;

public class TestEqDerive
{
    
    /**
     * @param args
     * @throws UnknownEquationTypeException
     */
    public static void main(String[] args) throws UnknownEquationTypeException
    {
        
        IEquation eq;
        System.out.println();
        eq = EquationUtility.parse("0.5x^2");
        eq.printUserReadable();
        DeriveUtility.derive(eq).printUserReadable();
        System.out.println();
        eq = EquationUtility.parse("0.6x^3 + 0.4x^1 + -1x^-1 + 8.7");
        eq.printUserReadable();
        DeriveUtility.derive(eq).printUserReadable();
        System.out.println();
        eq = EquationUtility.parse("(0.5x^2)(1x^4)");
        eq.printUserReadable();
        DeriveUtility.derive(eq).printUserReadable();
        System.out.println();
        eq = EquationUtility.parse("0.5x^2 + 0.5x^3 + 0.5x^4 + 0.5x^5");
        eq.printUserReadable();
        DeriveUtility.derive(eq).printUserReadable();
        System.out.println();
        eq = EquationUtility.parse("(0.5x^2)(0.5x^2) + 18x^6 + 3");
        eq.printUserReadable();
        DeriveUtility.derive(eq).printUserReadable();
        System.out.println();
        eq = EquationUtility.parse("(0.5x^2)(1.0x^1) + (-1)((1.0x^1)(0.5x^2))");
        eq.printUserReadable();
        DeriveUtility.derive(eq).printUserReadable();
        
    }
    
}
